package com.meowcook.pojo.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 28792
 * Date: 2025-05-16
 * Time: 14:01
 */
@Data
@ApiModel("收藏操作参数")
public class CollectionDTO {
    // 前端通过查询接口查询该食谱是否有过收藏记录，如果有则返回收藏记录id，再次收藏是只需更改删除状态，若id为空则表示第一次收藏
    @ApiModelProperty(value = "收藏记录id")
    private Long id;

    @NotNull
    @ApiModelProperty(value = "食谱id", required = true)
    private Long recipeId;

    @JsonIgnore
    private Long userId;

    @NotNull
    @ApiModelProperty(value = "是否收藏: 0-是，1-否")
    private Byte isDeleted;

    @ApiModelProperty(value = "是否公开: 0-公开, 1-私密")
    private Byte isBlocked;
}
